package com.sy.ai.run;

import org.springframework.ai.chat.client.ChatClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Component;

@Component
public class RunData implements ApplicationRunner {

    @Autowired
    ChatClient chatClient;

    @Override
    public void run(ApplicationArguments args) throws Exception {
        String content = chatClient.prompt().user("123")
                .call().content();
        System.out.println(content);
    }
}
